package com.ysd.lis.controller.inv;

import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.inv.InvReagentCategorize;
import com.ysd.lis.request.CommonPageDto;
import com.ysd.lis.service.inv.InvReagentCategorizeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-09-10
 */
@Api(tags = "试剂归类")
@RestController
@RequestMapping("/lis/inv/reagentCategorize")
public class InvReagentCategorizeController extends BaseController {

    @Autowired
    InvReagentCategorizeService invReagentCategorizeService;

    @ApiOperation("查询")
    @GetMapping("/findReagentCategorizeList")
    public Result findReagentCategorizeList(CommonPageDto param) {
        return invReagentCategorizeService.findReagentCategorizeList(param);
    }

    @ApiOperation("查询")
    @GetMapping("/findReagentCategorizeTree")
    public Result findReagentCategorizeTree(CommonPageDto param) {
        return invReagentCategorizeService.findReagentCategorizeTree(param);
    }

    @PostMapping("/addReagentCategorize")
    public Result addReagentCategorize(@RequestBody InvReagentCategorize categorize){
        return invReagentCategorizeService.addReagentCategorize(categorize);
    }

    @PostMapping("/editReagentCategorize")
    public Result editReagentCategorize(@RequestBody InvReagentCategorize categorize){
        return invReagentCategorizeService.editReagentCategorize(categorize);
    }

    @PostMapping("/deletReagentCategorize")
    public Result deletReagentCategorize(@RequestBody InvReagentCategorize categorize){
        return invReagentCategorizeService.deletReagentCategorize(categorize);
    }


}
